<aside class="aside">

    <?php wp_reset_query();if ( is_home()){ ?>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('小工具1') ) : ?>
    <?php endif; ?>
    <?php } ?>

    <?php if (!is_search()) { ?>
        <!--搜索 -->
        <div class="search-field">
            <p>搜索看文章&nbsp;或者&nbsp;&nbsp;&nbsp;<?php $rand_post=get_posts('numberposts=1&orderby=rand'); foreach($rand_post as $post) : ?><a class="present" href="<?php the_permalink(); ?>">随机看文章</a><?php endforeach; ?></p>
            <form method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" >
                <input type="text" onfocus="if (this.value == '回车搜索 直接有效') {this.value = '';}" onblur="if (this.value == '') {this.value = '回车搜索 直接有效';}" value="回车搜索 直接有效" name="s" class="s" /><input class="btn searchsubmit" type="submit" value="搜索">
            </form>
        </div>
    <?php } ?>
	
    
    <?php if (is_home()) { ?>
        <!--读者墙 -->
        <aside class="greater">
            <h3><span class="more"><a href="<?php echo stripslashes(get_option('d_readers_page_url')); ?>">读者墙&raquo;</a></span>活跃读者 （他们很给力）</h3>
            <div class="sub-greater">
                <?php vtheme_readers($outer='',$timer='1',$limit='14'); ?>
            </div>
        </aside>
    <?php }?>
    <!-- 广告-->
    <?php if (get_option('swt_ada') == 'Display') { ?>
	<div class="widget"><?php echo stripslashes(get_option('swt_adacode')); ?></div>
	<?php { echo ''; } ?><?php } else { } ?>
    <!--热评文章 -->
    <?php include('includes/r-tab.php'); ?>
    
    <!--推荐专题 -->
    <?php include('includes/r-sptags.php'); ?>
    
    <!--rss订阅 -->
    <?php if (is_home()) { ?>
    <div class="sub-list">
    <h4>订阅本站最新文章:</h4>
    <p class="rssfeed"><a href="<?php bloginfo('rss2_url'); ?>" target="_blank" class="icon1" title="欢迎订阅<?php bloginfo('name'); ?>"> feed: rss 2.0</a></p>
    </div>
    <?php }?>
    
    <?php if (is_home()) { ?>
        <!--友情链接 -->
        <aside class="sub-list">
            <h3>友情链接</h3>
            <ul class="article-list"><?php wp_list_bookmarks('orderby=id&categorize=0&category=2&title_li=&limit='.stripslashes(get_option('d_flinks_num'))); ?></ul>
        </aside>
    <?php }?>
    
</aside>
